<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>B2B电商平台.店铺商品类型维护</title>
<link rel="icon" href="include/images/icss.ico" type="image/x-icon" />
<link rel="shortcut icon" href="include/images/icss.ico"
	type="image/x-icon" />
<link rel="stylesheet" type="text/css"
	href="<%=path %>/include/css/global.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path %>/include/css/style.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path %>/include/css/pro.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path %>/include/css/proManage.css" />
<link rel="stylesheet"
	href="<%=path %>/include/JQuery ui/css/smoothness/jquery-ui-1.7.3.custom.css"
	type="text/css"></link>
<link rel="stylesheet" type="text/css"
	href="<%=path%>/include/pagination/page.css" media="all">
<link rel="stylesheet" type="text/css"
	href="<%=path %>/include/css/mmt_trading.css" />
<link rel="stylesheet"	href="<%=path %>/include/layer/skin/default/layer.css" type="text/css"></link>


<script type="text/javascript"
	src="<%=path %>/include/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/include/js/cookies.js"></script>
<script type="text/javascript" src="<%=path %>/include/js/icss.busin.js"></script>
<script type="text/javascript"
	src="<%=path %>/include/JQuery ui/js/jquery-ui-1.7.3.custom.min.js"></script>
<script type="text/javascript"
	src="<%=path %>/include/js/icss.common.js"></script>
<script type="text/javascript"
	src="<%=path%>/include/pagination/jquery.pagination.js"></script>
<script type="text/javascript"
	src="<%=path%>/include/pagination/init.js"></script>
<script type="text/javascript" src="<%=path %>/include/layer/layer.js"></script>




<style type="text/css">
.price a.price_rise {
	background-position: -62px -134px;
}

.price a.price_drop {
	background-position: -62px -93px;
}

.price a.price_null {
	background-position: -62px -15px;
	padding-right: 0px;
}

.price {
	margin: 0px auto;
}

.expire {
	margin: 0px auto;
}

.expire a.expire_drops {
	background-position: -61px -93px;
}

.expire a.expire_rise {
	background-position: -61px -134px;
}

.expire a.expire_null {
	background-position: -61px -15px;
	padding-right: 0px;
}
.stock {
	margin: 0px auto;
}

.stock a.stock_drops {
	background-position: -64px -93px;
	padding-right:12px;
}

.stock a.stock_rise {
	background-position: -61px -134px;
}

.stock a.stock_null {
	background-position: -61px -15px;
	padding-right: 0px;
}

#ajaxSerieslist a {
	text-decoration: none;
}

#ajaxSerieslist a:hover {
	text-decoration: underline;
}

#ajaxSerieslist td {
	border: 1px solid #ddd;
	text-align: center;
	padding: 4px;
}

#thead tr th {
	border: 1px solid #ddd;
	text-align: center;
}
button{
	background-image: url("<%=path%>/include/css/img/xs_bgx.png");
    background-color: transparent;
}

</style>

<script type="text/javascript">
$(document).ready(function() {

	$("#is_support_trade_div").click(function(){
		if($("#is_support_trade_select").is(":hidden")){
			$("#is_support_trade_select").show();
		}else{
			$("#is_support_trade_select").hide();
		}
	});
	$("#sellerConfirmSelect").click(function(){
		if($("#sellerConfirmSelectDown").is(":hidden")){
			$("#sellerConfirmSelectDown").show();
		}else{
			$("#sellerConfirmSelectDown").hide();
		}
	});
	
	_queryList("");
	
});

	function shouDialog(){
		$("#dialogDiv").dialog("open");
	}
	
	function gets_value(val){
		//alert(val.innerHTML);
		$("#is_support_trade_value").html(val.innerHTML);
	}
	function gets_value_fk(val){
		//alert(val.innerHTML);
		$("#sellerConfirmSelectValue").html(val.innerHTML);
	}

	function more(){
		if($("#more_term").is(":hidden")){
			$("#more_term").show();
			_reHeight("rightFrame","contentDiv");
		}else{
			$("#more_term").hide();
			_reHeight("rightFrame","contentDiv");
		}
	}

	function order(type){
		if(type=="price"){
			var className = $("#orderByPrice").attr('class');
			if(className == "price_drop"){
				$("#orderByPrice").removeClass().addClass("price_rise"); 
				_queryList(" PRODUCT_PRICE  ");
			}
			if(className == "price_rise"){
				$("#orderByPrice").removeClass().addClass("price_drop"); 
				_queryList(" PRODUCT_PRICE DESC ");
			}
			if(className == "price_null"){
				$("#orderByPrice").removeClass().addClass("price_drop"); 
				$("#showDateTdDescribe").removeClass().addClass("expire_null"); 
				$("#ratingStars").removeClass().addClass("expire_null"); 
				$("#orderByStock").removeClass().addClass("stock_null"); 
				_queryList(" PRODUCT_PRICE DESC ");
			}
		}
		if(type=="expire"){
			var className = $("#showDateTdDescribe").attr('class');
			if(className == "expire_drops"){
				$("#showDateTdDescribe").removeClass().addClass("expire_rise"); 
				_queryList(" UP_DATE  ");
			}
			if(className == "expire_rise"){
				$("#showDateTdDescribe").removeClass().addClass("expire_drops"); 
				_queryList(" UP_DATE DESC ");
			}
			if(className == "expire_null"){
				$("#showDateTdDescribe").removeClass().addClass("expire_drops"); 
				$("#orderByPrice").removeClass().addClass("price_null"); 
				$("#ratingStars").removeClass().addClass("expire_null"); 
				$("#orderByStock").removeClass().addClass("stock_null"); 
				_queryList(" UP_DATE DESC ");
			}
		}
		if(type=="rating"){
			var className = $("#ratingStars").attr('class');
			if(className == "expire_drops"){
				$("#ratingStars").removeClass().addClass("expire_rise"); 
				_queryList(" PRODUCT_SCORE  ");
			}
			if(className == "expire_rise"){
				$("#ratingStars").removeClass().addClass("expire_drops"); 
				_queryList(" PRODUCT_SCORE DESC ");
			}
			if(className == "expire_null"){
				$("#ratingStars").removeClass().addClass("expire_drops"); 
				$("#showDateTdDescribe").removeClass().addClass("expire_null"); 
				$("#orderByPrice").removeClass().addClass("price_null"); 
				$("#orderByStock").removeClass().addClass("stock_null"); 
				_queryList(" PRODUCT_SCORE DESC ");
				
			}
		}
		if(type=="stock"){
			var className = $("#orderByStock").attr('class');
			if(className == "stock_drops"){
				$("#orderByStock").removeClass().addClass("stock_rise"); 
				_queryList(" PRODUCT_STOCK  ");
			}
			if(className == "stock_rise"){
				$("#orderByStock").removeClass().addClass("stock_drops"); 
				_queryList(" PRODUCT_STOCK DESC ");
			}
			if(className == "stock_null"){
				$("#orderByStock").removeClass().addClass("stock_drops"); 
				$("#showDateTdDescribe").removeClass().addClass("expire_null"); 
				$("#orderByPrice").removeClass().addClass("price_null"); 
				$("#ratingStars").removeClass().addClass("expire_null"); 
				_queryList(" PRODUCT_STOCK DESC ");
				
			}
		}
	}

	
	

	//处理查询条件的默认值
    //参数：id;ovalue原值;nvalue 新值; type：事件类型（1表示获取焦点 2表示失去焦点）
    function clearDefaultVal(id,type,ovalue,nvalue){
        if(type==1){//判断事件类型(获取焦点,情况现有默认值)
            jQuery("#"+id).val("");
        }else{
            //失去焦点，值为空，赋默认值
            if(nvalue==""){
                jQuery("#"+id).val(ovalue);
            }
        }
    }

    function selectAlledTop(){
    	if($("#topCheckAll").attr("checked")=="checked"){
		    $("input[name='productId']").each(function(index,item){
		    		$(this).attr("checked",true);
		    })
		    $("#checkAll").attr("checked",true);
    	}else{
		    $("input[name='productId']").each(function(index,item){
		    		$(this).attr("checked",false);
		    })
		    $("#checkAll").attr("checked",false);
    	}
    }

    function selectalled(){
    	if($("#checkAll").attr("checked")=="checked"){
		    $("input[name='productId']").each(function(index,item){
		    		$(this).attr("checked",true);
		    })
		    $("#topCheckAll").attr("checked",true);
    	}else{
		    $("input[name='productId']").each(function(index,item){
		    		$(this).attr("checked",false);
		    })
		    $("#topCheckAll").attr("checked",false);
    	}
    }

    function down(){
        var priceIds =""
    	 $("input[name='productId']").each(function(index,item){
    		 if($(this).attr("checked")=="checked"){
    			 priceIds += $(this).val()+",";
        	 }
	    })
	    if(priceIds==""){
		    //alert("请至少选择一条记录！");
		    parent.swal("请至少选择一条记录!");
		    return;
		}else{
			// if(event.returnValue = confirm("确认是否下架吗？")){
				 //alert("下架了");
			//	 $.ajax({
			//			type:"post",
			//			url: "<%=path %>/productForSale/productDown.do",
			//			data:{productIds:priceIds},
			//			dataType:"json",
			//			success:function(data){
			//				if(data.success){
			//					_queryList("");
			//				}
			//			}
			//		});
			// }

			 parent.swal({
					title: "下架", 
					text: "确认是否下架吗？", 
					type: "warning",
					showCancelButton: true,
					closeOnConfirm: false,
					cancelButtonText: "取消",
					confirmButtonText: "下架",
					confirmButtonColor: "#ec6c62"
					}, function() {
						parent.swal.close();
						$.ajax({
							type:"post",
							url: "<%=path %>/productForSale/productDown.do",
							data:{productIds:priceIds},
							dataType:"json",
							success:function(data){
								if(data.success){
									_queryList("");
								}
							}
						});
				});
			
		}
    }

    function _delete(){
        var priceIds =""
    	 $("input[name='productId']").each(function(index,item){
    		 if($(this).attr("checked")=="checked"){
    			 priceIds += $(this).val()+",";
        	 }
	    })
	    if(priceIds==""){
	    	parent.swal("请至少选择一条记录!");
		    return;
		}else{
			 //if(event.returnValue = confirm("确认是否删除吗？")){
			//	 $.ajax({
			//			type:"post",
			//			url: "<%=path %>/productForSale/productDel.do",
			//			data:{productIds:priceIds},
			//			dataType:"json",
			//			success:function(data){
			//				if(data.success){
			//					_queryList("");
			//				}
			//			}
			//		});
			 //}

			parent.swal({
				title: "删除", 
				text: "确认是否删除吗？", 
				type: "warning",
				showCancelButton: true,
				closeOnConfirm: false,
				confirmButtonText: "删除",
				confirmButtonColor: "#ec6c62"
				}, function() {
					$.ajax({
						type:"post",
						url: "<%=path %>/productForSale/productDel.do",
						data:{productIds:priceIds},
						dataType:"json",
						success:function(data){
							if(data.success){
								_queryList("");
							}
						}
						});
			});
			
		}
    }
    function _del(id){
       
		// if(event.returnValue = confirm("确认是否删除吗？")){
		//	 $.ajax({
		//			type:"post",
		//			url: "<%=path %>/productForSale/productDel.do",
		//			data:{productIds:id+","},
		//			dataType:"json",
		//			success:function(data){
		//				if(data.success){
		//					_queryList("");
		//				}
		//			}
		//		});
		// }

		 parent.swal({
				title: "删除", 
				text: "确认是否删除吗？", 
				type: "warning",
				showCancelButton: true,
				closeOnConfirm: false,
				cancelButtonText: "取消",
				confirmButtonText: "删除",
				confirmButtonColor: "#ec6c62"
				}, function() {
					 $.ajax({
							type:"post",
							url: "<%=path %>/productForSale/productDel.do",
							data:{productIds:id+","},
							dataType:"json",
							success:function(data){
								if(data.success){
									_queryList("");
								}
							}
						});
			});
			
		
    }

    function toView(id){
    	window.location.href ="<%=path%>/productPublish/toProductPublishInfoPage.do?pageFlag=info&productId="+id;
    }
	function _editPrice(id,name){
    	var url = "<%=path%>/productPrice/modifyPrice.do?productId="+id;
    	parent.layer.open({
  			title: ' ',
  			type: 2, 
  			area: ['750px', '450px'],
  			content: [url,'no'] //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: [url, 'no']
		});
    }
    function _edit(id){
    	window.location.href ="<%=path%>/productPublish/toProductPublishInfoPage.do?pageFlag=edit&productId="+id;
    }
    function _addStock(productName,productId,productCost){
    	var htmlStr = "<div style='margin-top:10px;width:100%;text-align:center;overflow:hidden;'>";
    	htmlStr +="<div style='width:50%;float:left;text-align:right;'>补货量：</div>";
    	htmlStr +="<div style='width:50%;float:left;'><input type=\'text\' id=\'addAmount\' name=\'addAmount\' style=\"text-align:right;border: 1px solid #c7c7c7;height: 22px;width: 120px;\" />";
    	htmlStr +="<div id='addAmountSpan' style='color:red;text-align: left;font-size: 14px;'></div></div>";
    	htmlStr +="<br/><br/><div style='width:50%;float:left;text-align:right;'>成本价格（元）：</div>";
    	htmlStr +="<div style='width:50%;float:left;'><input type=\'text\' id=\'addPrice\' name=\'addPrice\' value=\'"+productCost+"\' style=\"text-align:right;border: 1px solid #c7c7c7;height: 22px;width: 120px;\" />";
    	htmlStr +="<div id='addPriceSpan' style='color:red;text-align: left;font-size: 14px;'></div></div>";
    	htmlStr +="<br/><div style='width:50%;float:left;text-align:right;'>原成本价格（元）：</div><div style='width:50%;float:left;text-align: left;'>"+productCost+"</div>";
    	htmlStr +="</div>";
    	
    	parent.swal({   
			title: "商品补货",  
			text: "商品名称："+productName+"<br/>"+htmlStr,   
			html: true,
			showCancelButton: true,
			closeOnConfirm: false,
			cancelButtonText: "取消",
			cancelButtonColor: "#ec6c62",
			confirmButtonText: "确定",
			confirmButtonColor: "#ec6c62",  
			animation: "slide-from-top"
		}, function(){   
				var addAmount = parent.document.getElementById("addAmount").value;
				var addPrice = parent.document.getElementById("addPrice").value;
				var result = _checkNumF("2",addAmount);
				if(!result){
					window.parent.document.getElementById("addAmountSpan").innerHTML = "请输入正确补货量！";
					return;
				}
				result = _checkNumF("1",addPrice);
				if(!result){
					parent.document.getElementById("addPriceSpan").innerHTML = "请输入正确成本价！";
					return;
				}
				if(result){
					_addStockSave(productId,addAmount,addPrice);
				}
				
		});
    }
    function _addStockSave(productId,addAmount,addPrice){
 		jQuery.ajax({
			type:"post",
			url: "<%=path %>/productForSale/addStockSave.do",
			dataType: "json",
			data: {
				productId : productId,
				addAmount : addAmount,
				addPrice : addPrice
			},
			success:function(data){
				if(data.success){
					parent.swal("操作成功!", "保存成功！", "success");
				}else {
					parent.swal("OMG", "保存失败!", "error");
				}
			}
		});
	}
    var pagination;
	function _queryList(order){
		var title = $("#queryTitle").val();
		if(title =="请输入商品标题..."){
			title = "";
		}
		var minPriceStr = $("#minPriceStr").val(); 
		var maxPriceStr = $("#maxPriceStr").val(); 
		if(minPriceStr =="最低价格"){
			minPriceStr = "";
		}else{
			if(isNaN(minPriceStr)){
				return;
			}
		}
		if(maxPriceStr =="最高价格"){
			maxPriceStr = "";
		}else{
			if(isNaN(maxPriceStr)){
				return;
			}
		}

		var firstSeries = $("#firstSeries").val(); 
		var secondSeries = $("#secondSeries").val(); 
		
		var url = "<%=path %>/productForSale/productForSaleList.do?order="+order+"&title="+title+"&minPriceStr="+minPriceStr+"&maxPriceStr="+maxPriceStr+"&firstSeries="+firstSeries+"&secondSeries="+secondSeries;
  			pagination = _initPagination({'pageId':'pagination', 'cKey':'toProductForSaleList','url': url, 'rows': 6, 'callback':_initDataList});
	}
	function _initDataList(data) {
	 		var d = data.rows;
	 		var total = data.total;
			var str = "";
			$("#ajaxSerieslist").empty();
			for(var i=0;i<d.length;i++){
				
				str += "<tr>";
				str += "    <td class='t1' style='text-align:center;vertical-align: middle'>";
				str += " 		<input type='checkbox' name='productId' value='"+d[i].PRODUCT_ID+"' star='3' mainpro=''>";
				str += "    </td>";
				str += "    <td class='t2' style='text-align:center;vertical-align: middle'>";
				//str += "    	<div class='pic_50'>";
				str += "    		<a href='javascript:toView(\""+d[i].PRODUCT_ID+"\")' target='_blank'>";
				if(d[i].PRODUCT_PIC==undefined){
					str += "        		<img src='<%=path%>/download/error/nopicture.jpg'  alt='' resizeimg='true' onmousedown='' onerror='javascript:this.src=\"<%=path%>/download/error/nopicture.jpg\";' style='width: 50px; height: 43.5px;'>";
				} else {
					str += "        		<img src='"+d[i].PRODUCT_PIC+"'  alt='' resizeimg='true' onmousedown='' onerror='javascript:this.src=\"<%=path%>/download/error/nopicture.jpg\";' style='width: 50px; height: 43.5px;'>";
				}
				str += "    		</a>";
				//str += " 		</div>";
				str += "	</td>";
				str += " 	<td class='t3' style='text-align:left;vertical-align: middle'>";
				//str += "		<p>";
				str += "			&nbsp;<a href='javascript:toView(\""+d[i].PRODUCT_ID+"\")' target='_blank'>"+d[i].PRODUCT_NAME+"</a>";
				//str +="			</p>";
				//str +="			<p>被访问次数:<a onmousedown='' href='' id='Totalvisit0'>0</a>次</p>";
				str +=" 	</td>";
				if(d[i].PRODUCT_PRICE!=undefined){
					str +="		<td class='t4' style='text-align:right;vertical-align: middle'>"+d[i].PRODUCT_PRICE+"元&nbsp;";
				}else{
					str +="		<td class='t4' style='text-align:right;vertical-align: middle'>未定义价格&nbsp;";
				}
				str +="		</td>";
				str +="		<td class='t2' style='text-align:right;vertical-align: middle;'>";
				if(d[i].PRODUCT_STOCK<=d[i].PRODUCT_STOCK_WARNING)
					str +="			<a style='color:red' href='javascript:_alarmSetting(\""+ d[i].PRODUCT_ID +"\",\""+ d[i].PRODUCT_NAME +"\",\""+ d[i].PRODUCT_UNIT_NAME +"\",\""+ d[i].STOCK_WARNING +"\")' >"+d[i].PRODUCT_STOCK+d[i].PRODUCT_UNIT_NAME+"</a>&nbsp;";
				else
					str +="			<a href='javascript:_alarmSetting(\""+ d[i].PRODUCT_ID +"\",\""+ d[i].PRODUCT_NAME +"\",\""+ d[i].PRODUCT_UNIT_NAME +"\",\""+ d[i].STOCK_WARNING +"\")' >"+d[i].PRODUCT_STOCK+d[i].PRODUCT_UNIT_NAME+"</a>&nbsp;";
				str +="		</td>";
				str +="		<td class='t4' id='pubdateTd'  style='text-align:center;vertical-align: middle'>";
				str +=" 		<span class='pubdateSpan'>"+d[i].UP_DATE+"</span>";
				str +=" 	</td>";
				str +=" 	<td class='t6' style='text-align:center;vertical-align: middle'>";
				str +="    		<a href='javascript:_editPrice(\""+ d[i].PRODUCT_ID +"\")' >价格修改</a>";
				str +="      		/&nbsp;<a href=\"javascript:void('')\" onclick=\"_addStock('"+ d[i].PRODUCT_NAME +"','"+ d[i].PRODUCT_ID +"','"+ d[i].PRODUCT_COST +"')\">补货</a>";
				str +=" 		";
				str +=" 	</td>";                
				str +=" </tr>";
			}
			$("#ajaxSerieslist").append(str);
			setTimeout(function(){_reHeight("rightFrame","contentDiv");},1000);
	 }

	function _getSelect(){
		
		jQuery.ajax({
			type:"post",
			url: "<%=path%>/productForSale/getProductType2List.do",
			dataType : "json",
			data : {
				firstSeries : $("#firstSeries").val()
			},
			success : function(data) {
				if (data != null) {
					jQuery("#secondSeries").empty();
					jQuery("#secondSeries").prepend(
							"<option value='0'>选择二级分类</option>"); //为Select插入一个Option(第一个位置)
					for (var i = 0; i < data.ejfl.length; i++) {
						//为Select追加一个Option(下拉项)
						jQuery("#secondSeries").append(
								"<option value='"+data.ejfl[i].code+"'>"
										+ data.ejfl[i].name + "</option>");
					}
				}
			}
		});

	}

	function _alarmSetting(productId,productName,productUnit,productStockWarning){
    	var htmlStr = "	<div style='margin-top:10px;width:100%;text-align:center;overflow:hidden;'>";
    	htmlStr +="			<div style='width:30%;float:left;text-align:right;'>商品名称：</div>";
    	htmlStr +="			<div style='width:70%;float:left;margin-bottom: 10px;text-align: left;'>"+productName;
    	htmlStr +="		</div>";
    	htmlStr +="		<div style='width:30%;float:left;text-align:right;'>低于</div>";
    	htmlStr +="			<div style='width:70%;float:left;'><input type=\'text\' value=\'"+productStockWarning+"\' id=\'stockWarning\' name=\'stockWarning\' style=\"text-align:right;border: 1px solid #c7c7c7;height: 22px;width: 120px;color:red;float:left\" /><div style='width:50%;float:left;text-align: left;'>&nbsp;"+productUnit+"预警</div>";
    	htmlStr +="			<br/><div id='stockWarningSpan' style='color:red;text-align: left;font-size: 14px;margin-top: 10px;'></div>";
    	htmlStr +="		</div>";
    	
    	parent.swal({   
			title: "商品补货预警设置",  
			text: htmlStr,   
			html: true,
			showCancelButton: true,
			closeOnConfirm: false,
			cancelButtonText: "取消",
			cancelButtonColor: "#ec6c62",
			confirmButtonText: "确定",
			confirmButtonColor: "#ec6c62",  
			animation: "slide-from-top"
		}, function(){   
				var stockWarning = parent.document.getElementById("stockWarning").value;
				var result = _checkNumF("2",stockWarning);
				if(!result){
					window.parent.document.getElementById("stockWarningSpan").innerHTML = "请输入正确的预警货量！";
					return;
				}
				if(result){
					_alarmSettingSave(productId,stockWarning);
				}
				
		});
    }

    function _alarmSettingSave(productId,stockWarning){
    	jQuery.ajax({
			type:"post",
			url: "<%=path %>/productForSale/alarmSettingSave.do",
			dataType: "json",
			data: {
				productId : productId,
				stockWarning : stockWarning
			},
			success:function(data){
				if(data.success){
					parent.swal("操作成功!", "保存成功！", "success");
					_queryList("");
				}else {
					parent.swal("OMG", "保存失败!", "error");
				}
			}
		});
    }
</script>
</head>

<body style="font-family: '微软雅黑'">
	<div id="contentDiv" style="padding:4px; width:99%;">
		<div class="colnums-2-ab-b" style="overflow-x:auto;">
			<div class="toptil">在售商品</div>
			<div class="search_lis"
				style="border: 1px solid #e0e0e0;background: #f5f5f5;padding-left:10px;margin-bottom:10px;width:98.5%;">
				<!--search_lis S-->
				<div class="search_lis_se" style="font-size: 14px;">
					<!--search_lis_se S-->
					<span>商品标题： </span><input name="querytitle" id="queryTitle"
						type="text" class="in_bit" maxlength="40" style="height: 24px;" value="请输入商品标题..."
						defaultval="请输入商品标题..."
						onblur="clearDefaultVal('queryTitle',2,'请输入商品标题...',this.value)"
						onfocus="clearDefaultVal('queryTitle',1,'','')">
					<div class="se_dow" style="z-index:999;display: none;"
						id="is_support_trade_div">
						<font id="is_support_trade_value">交易类型</font>
						<div id="is_support_trade_select" class="se_dow_list"
							style="display:none;">
							<a href="javascript:void(0);" onclick="gets_value(this)">交易类型</a>
							<a href="javascript:void(0);" onclick="gets_value(this)">支持在线交易</a>
							<a href="javascript:void(0);" onclick="gets_value(this)">不支持在线交易</a>
						</div>
					</div>

					<span>价格:</span> <input name="minPriceStr" id="minPriceStr"
						type="text" class="in_price" value="最低价格" maxlength="10"
						style="color:#999;height: 24px;width: 80px;" defaultval="最低价格"
						onblur="clearDefaultVal('minPriceStr',2,'最低价格',this.value)"
						onfocus="clearDefaultVal('minPriceStr',1,'','')"> <i>-</i>
					<input name="maxPriceStr" id="maxPriceStr" type="text"
						class="in_price" value="最高价格" maxlength="10" style="color:#999;height: 24px;width: 80px;"
						defaultval="最高价格"
						onblur="clearDefaultVal('maxPriceStr',2,'最高价格',this.value)"
						onfocus="clearDefaultVal('maxPriceStr',1,'','')">
					<!--  select class="setopt" id="sellerConfirmSelect" name="sellerConfirm">
                <option value="">付款设置</option>
                <option value="no">买家下单后即可付款</option>
                <option value="yes">卖家确认后才可付款</option>
            </select-->
					&nbsp;&nbsp;
					<div class="se_dow"
						style="z-index:999;margin-left: 10px;width: 125px;display: none;"
						id="sellerConfirmSelect">
						<font id="sellerConfirmSelectValue">付款设置</font>
						<div id="sellerConfirmSelectDown" class="se_dow_list"
							style="display:none;width: 123px;">
							<a href="javascript:void(0);" style="width: 123px;"
								onclick="gets_value_fk(this)">付款设置</a> <a
								href="javascript:void(0);" style="width: 123px;"
								onclick="gets_value_fk(this)">买家下单后即可付款</a> <a
								href="javascript:void(0);" style="width: 123px;"
								onclick="gets_value_fk(this)">卖家确认后才可付款</a>
						</div>
					</div>

					<button type="button" class="cxx_btn" onclick="_queryList('')">查询</button>
					&nbsp;&nbsp;<a href="javascript:void(0);" onclick="more()"
						target="_self" id="more_term_link" name="more_term_link"
						condition="1">更多搜索条件</a>
					<div class="clear"></div>
					<div id="nomore" style="display: none;">&nbsp;</div>
					<div id="more_term" style="display: none;margin-top: 10px;">
						<div class="actbus" style="margin-left: 0px;">
							<label>炫铺分类:</label>
						</div>
						<select id="firstSeries" name="firstSeries" autocomplete="off"
							onchange="_getSelect()" style="height: 22px;">
							<option value="0">选择一级分类</option>
							<c:forEach items="${yjfl}" var="y">
								<option value="<c:out value='${y.code}'/>">
									<c:out value='${y.name}' /></option>
							</c:forEach>
						</select> <select name="secondSeries" id="secondSeries" autocomplete="off"
							style="height: 22px;">

						</select>
					</div>
				</div>
				<div class="wantBuy" id="caigouInfo"></div>
			</div>


			<div class="listed_tb_k" style="width:99.65%;border: none;">
				<!-- 销售中商品  重发、永久删除、转为过期等功能在列表顶部显示  2014-10-23 0发版 moxiaoyang-->
				<!-- <div class="list_table_bot">
					<div style="margin-bottom: 7px;">
						<label><input id="topCheckAll" name="topCheckAll"
							type="checkbox" onclick="selectAlledTop()" class="chk">全选</label>
						<button class="gray_btn" type="button" onclick="javascript:down()">下架</button>
						<button class="gray_btn" type="button"
							onclick="javascript:_delete()">删除</button>
					</div>
				</div> -->
				<table cellspacing="0" cellpadding="0">
					<thead id="thead">
						<tr>
							<th colspan="7" style="background-color: white;">
								<div class="list_table_bot">
									<div style="margin-bottom: 7px;text-align: left;">
										<label><input id="topCheckAll" name="topCheckAll"
											type="checkbox" onclick="selectAlledTop()" class="chk">全选</label>
										<button class="cxx_btn" type="button"
											onclick="javascript:down()">下架</button>
									</div>
								</div>

							</th>
						</tr>
						<tr>
							<th class="t1" style="text-align:center;vertical-align: middle">选项</th>
							<th class="t2" style="text-align:center;vertical-align: middle">图片</th>
							<th class="t3" style="text-align:center;vertical-align: middle">标题</th>
							<th class="t4" style="text-align:center;vertical-align: middle">
								<div class="price">
									<!--  <a href="javascript:void('');" class="price_rise" id="orderByPrice"><span style="color: black;">价格</span></a> -->
									<a href="javascript:order('price');" class="price_null"
										id="orderByPrice"><span style="color: black;">价格</span></a>
								</div>
							</th>
							<th class="t2" style="text-align:center;vertical-align: middle">
								<div class="stock">
									<!--  <a href="javascript:void('');" class="price_rise" id="orderByPrice"><span style="color: black;">价格</span></a> -->
									<a href="javascript:order('stock');" class="stock_null"
										id="orderByStock"><span style="color: black;">库存</span></a>
								</div>
							</th>
							<th class="t4"
								style="text-align:center;vertical-align: middle;text-align: center">
								<!--	<div class="expire"><a href="javascript:void('');" class="expire_drops" id="showDateTdDescribe">发布日期</a></div> -->
								<div class="expire">
									<a href="javascript:order('expire');" class="expire_drops"
										id="showDateTdDescribe">发布日期</a>
								</div>
							</th>
							<!-- 
                <th class="t5" style="text-align:center;vertical-align: middle;text-align: center" >
                   	 <div class="expire"><a href="javascript:order('rating');" class="expire_null" id="ratingStars">质量星级</a></div>
                </th>
                 -->
							<!--实时计算新增列结束-->
							<th class="t6"
								style="text-align:center;vertical-align: middle;">操作</th>
						</tr>
					</thead>
					<tbody id="ajaxSerieslist">
					</tbody>
				</table>
				<!--  <div class="list_table_bot">
	            <div style="margin-bottom: 7px;">
	                <div id="TimeLayer01" class="w_tips weiz_1" style="visibility: hidden;">
	                    <div>使信息发布时间变为最新，排名靠前！</div>
	                    <span>&nbsp;</span>
	                </div>
	                <div id="TimeLayer02" class="w_tips weiz_2" style="visibility: hidden;">
	                    <div>信息删除后将不能恢复</div>
	                    <span>&nbsp;</span>
	                </div>
	                <div id="TimeLayer03" class="w_tips weiz_3" style="visibility: hidden;">
	                    <div>下架信息后，网上将搜索不到</div>
	                    <span>&nbsp;</span>
	                </div>
	                <label><input id="checkAll" name="checkAll" type="checkbox" onclick="selectalled()" class="chk">全选</label>
	                <button class="gray_btn" type="button" onclick="javascript:down()">下架</button>
	                <button class="gray_btn" type="button" onclick="javascript:_delete()" >删除</button>
	            </div>
	        </div> -->
				<div id="pagination"></div>
			</div>

			<!-- InstanceEndEditable -->
		</div>
		<!--colnums-2-ab-b begin-->
		<div class="clear"></div>

		<div id="dialogDiv"
			style="text-align: center;padding-top:24px;display:none;">
			<label>帐号:</label><input type="text" id="user" /><br> <label>密码:</label><input
				type="password" id="password" /><br>
		</div>

	</div>

</body>

<script type="text/javascript">
	$(document).ready(function() {
		_reHeight("rightFrame", "contentDiv");
	});
</script>
</html>
